<template>
<div id="index">
  <van-notice-bar mode="closeable" v-if="systemInfo">
  {{systemInfo}}
  </van-notice-bar>
  <bole v-if="active==1"></bole>
  <lietou v-else></lietou>
</div>
</template>

<script>
import Config from '@/components/project.config'
import bole from '@/components/bole'
import lietou from '@/components/lietou'
export default {
  components: {
    bole,
    lietou
  },
  data:function(){
    return {
      active : 1,
      systemInfo: ''
    }
  },
  mounted(){
    console.log(this.$store.state.user+'获取当前用户的信息 from index')
    this.active = this.$store.state.user.role
    this.$http.get(Config + '/api/system/notice/get').then(
      function(rsp){
        if(rsp.code == 1){
          this.systemInfo = rsp.data.data.content
        }
      }
    )
  }
}
</script>

<style lang="stylus" scoped>

</style>

